From: Julien Grall Date: Wed, 7 Dec 2016 12:33:42 +0000 (+0000) Subject: xen/arm: vtimer: Switch the read variable in the emulation from int to bool X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~3237 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=8d5828e91348f47056f73b42bc415c8e3364f4a2;p=xen.git xen/arm: vtimer: Switch the read variable in the emulation from int to bool The read variable can only take two values: 1 => read, 0 => write. Use bool instead to make clear the variable can only take 2 values. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c index f8d32956cc..3fc97b3451 100644 --- a/xen/arch/arm/vtimer.c +++ b/xen/arch/arm/vtimer.c @@ -164,7 +164,7 @@ int virt_timer_restore(struct vcpu *v) return 0; } -static bool vtimer_cntp_ctl(struct cpu_user_regs *regs, uint32_t *r, int read) +static bool vtimer_cntp_ctl(struct cpu_user_regs *regs, uint32_t *r, bool read) { struct vcpu *v = current; @@ -193,7 +193,8 @@ static bool vtimer_cntp_ctl(struct cpu_user_regs *regs, uint32_t *r, int read) return true; } -static bool vtimer_cntp_tval(struct cpu_user_regs *regs, uint32_t *r, int read) +static bool vtimer_cntp_tval(struct cpu_user_regs *regs, uint32_t *r, + bool read) { struct vcpu *v = current; s_time_t now; @@ -221,7 +222,8 @@ static bool vtimer_cntp_tval(struct cpu_user_regs *regs, uint32_t *r, int read) return true; } -static bool vtimer_cntp_cval(struct cpu_user_regs *regs, uint64_t *r, int read) +static bool vtimer_cntp_cval(struct cpu_user_regs *regs, uint64_t *r, + bool read) { struct vcpu *v = current; @@ -320,9 +322,9 @@ static bool vtimer_emulate_cp64(struct cpu_user_regs *regs, union hsr hsr) #ifdef CONFIG_ARM_64 typedef bool (*vtimer_sysreg32_fn_t)(struct cpu_user_regs *regs, uint32_t *r, - int read); + bool read); typedef bool (*vtimer_sysreg64_fn_t)(struct cpu_user_regs *regs, uint64_t *r, - int read); + bool read); static bool vtimer_emulate_sysreg32(struct cpu_user_regs *regs, union hsr hsr, vtimer_sysreg32_fn_t fn)